package com.itheima.pinda.controller.agency;

import com.itheima.pinda.DTO.entity.DGlobalUser;
import com.itheima.pinda.DTO.entity.vo.Results;
import com.itheima.pinda.DTO.entity.vo.StatusCode;
import com.itheima.pinda.feign.service.DGlobalUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author xy
 * @since 2021-11-12
 */
@RestController
@RequestMapping("/base/globalUser")
public class GlobalUserController {

    @Autowired
    private DGlobalUserService globalUserService;

    @PostMapping("/")
    public Results<List<DGlobalUser>> findAll(){

        List<DGlobalUser> userList = globalUserService.findAll();

        return new Results<>(true, StatusCode.OK,"查询成功",userList);
    }
}
